import request from '@/utils/request';

/**
 * getMyTodoTaskList
 * @param data
 * @returns
 */
export const getMyTodoTaskList = (data) => {
  return request('/yst-workflow/workflow/api/myTodoTask', {
    method: 'post',
    query: data
  });
};

/**
 * getMyCompletedTaskList
 * @param data
 * @returns
 */
export const getMyCompletedTaskList = (data) => {
  return request('/yst-workflow/workflow/api/myCompletedTask', {
    method: 'post',
    query: data
  });
};

/**
 * getMyCreatedTaskList
 * @param data
 * @returns
 */
export const getMyCreatedTaskList = (data) => {
  return request('/yst-workflow/workflow/api/myCreateProcess', {
    method: 'post',
    query: data
  });
};

/**
 * getMyAttendTaskList
 * @param data
 * @returns
 */
export const getMyAttendTaskList = (data) => {
  return request('/yst-workflow/workflow/api/myParticipateProcess', {
    method: 'post',
    query: data
  });
};

/**
 * getProcDefsDropdownList
 * @returns
 */
export const getProcDefsDropdownList = () => {
  return request(`/yst-workflow/workflow/api/query/procDefs`, {
    method: 'get'
  });
};
